import os
import re

file_path = os.path.join('data_src','课题名称.txt')

with open(file_path,encoding='utf8') as file_hdlr:
    txt_src = file_hdlr.readlines()

txt_src = [e.strip() for e in txt_src]

rst = '\n'.join(txt_src)

with open(file_path,encoding='utf8',mode='w') as file_writer:
    file_writer.write(rst)